import io.minio.MinioClient;
import io.minio.RemoveObjectArgs;
import io.minio.RemoveObjectsArgs;
import io.minio.messages.DeleteObject;
import org.jetbrains.annotations.NotNull;

import java.util.Iterator;

public class DeleteTest {
    static MinioClient minioClient = MinioClient.builder()
            .endpoint("http://localhost:9000")
            .credentials("minioadmin", "minioadmin")
            .build();

    public static void main(String[] args) {
        try {
            minioClient.removeObject(
                    RemoveObjectArgs.builder()
                            .bucket("test")
                            .object("001/test001.mp4")
                            .build()
            );
            System.out.println("删除文件成功");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("删除文件失败");
        }
    }
}
